home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / tools / czesc_1 / aview / install / aview.install next >
Text File  |  1984-07-04  |  16KB  |  478 lines

  1. ; $VER: AView.install 1.00 (02.09.96)
  2. ; Install script for AFind (Workbench 2.0 or higher)
  3. ;
  4. (COMPLETE 0)
  5. ;(USER 2)
  6. (SET #ApplicationName "AView")
  7. (SET #ApplicationDir "sys:tools/")
  8. ;(SET #ApplicationDir "ram:")
  9. (SET #ArchiveDir "/")
  10. (SET #Language -1)
  11. (SET #Documents -1)
  12. (SET #ApplicationKeyfile (CAT #ApplicationName ".key"))
  13.  
  14. ;=============================================================================
  15. ; German strings
  16.  
  17. (IF (= @language "deutsch")
  18. (
  19. (SET default_lang 2)
  20.  
  21. (SET #bad-kick "Sie benötigen Workbench 2.0 oder größer")
  22. (SET #bad-installer
  23. (CAT "Achtung! Es ist eine alte Version des Programmes 'Installer' "
  24.      "auf Ihrem Amiga!\n\nDie Installation benötigt mindestens Installer 42.9.\n\n"
  25.      "Bitte überprüfen Sie Ihre Konfiguration!\n"
  26.      "Wenn Sie fortfahren, wird eine Vollinstallation vorgenommen, das heißt\n"
  27.      "es werden alle Kataloge,Anleitungen und die OS2.0+ Version installiert.\n"
  28.      "%s ist auch dann voll einsatzfähig!"
  29. ))
  30.  
  31. (SET #App-InstallMsg
  32. (CAT "\n\%s Installationsskript.\n"
  33.         "Diese Skript installiert %s auf Ihrem Amiga.\n\n"
  34.         "Lesen Sie das Anleitungs-File für weitere Informationen\n"
  35.         " über den Vertrieb von %s.\n\n"
  36.         "%s © 1995-96 Guido Mersmann\n"
  37.         "All Rechte reserviert."
  38. ))
  39.  
  40. (SET #App-Where
  41. (CAT "Wo möchten Sie %s installieren ?\n"
  42.         "(Ein Verzeichnis wird angelegt)"
  43. ))
  44.  
  45. (SET #App-Update
  46. (CAT "\nEin %s-Verzeichnis existiert im ausgewählen"
  47.         " Verzeichnis. Wenn Sie fortfahren,"
  48.         " bestätigen Sie, daß Sie die alte %s-Installation"
  49.         " mit der neuesten Version updaten wollen.\n"
  50.         "Verschiedene %s-Dateien (z.B Prefs) werden falls nötig überschrieben!"
  51. ))
  52.  
  53. (SET #App-Main "Welche Version von %s möchten Sie installieren?")
  54. (SET #App-Main-help
  55. (CAT "Die OS2.0+ Version läuft unter allen Systemen ab OS2.0."
  56.      " Die OS2.1+ Version hat den Nutzen, daß sie weniger Resourcen"
  57.      " benutzt, wenn sich %s im Hintergrund befindet. Dazu MUß"
  58.      " die Locale.library eingebunden sein. Für die OS3.0+ gilt das selbe"
  59.      " wie für die OS2.1 Verison. Es werden OS3.0+ Routinen benutzt, die"
  60.      " weiteren Speicher sparen."
  61. ))
  62.  
  63. (SET #App-Language "Welche Sprachen sollen installiert werden ?")
  64.  
  65. (SET #App-Language-help
  66. (CAT "\nDer Amiga kann in vielen verschiedenen Sprachen"
  67.          " arbeiten. Um Plattenkapazität zu sparen können Sie"
  68.          " nur die Sprachen anwählen, die sie benötigen"
  69.          " Haken Sie also einfach die Sprachen ab, die Sie"
  70.          " Ihrem System zugänglich machen wollen."
  71.           @askoptions-help
  72. ))
  73.  
  74. (SET #App-Docs "Welche Anleitungs- und Informationsdateien wollen Sie installieren ?")
  75.  
  76. (SET #startup-prompt    "Jetzt werden für %s folgende Eintragungen in die S:User-Startup gemacht:\n\n%s")
  77.  
  78.  
  79. (SET #App-Exit "\n%s installiert !!")
  80.  
  81.  
  82. ))
  83.  
  84. ;=============================================================================
  85. ; English strings
  86.  
  87. (IF (<> @language "deutsch")
  88. (
  89. (SET default_lang 4)
  90.  
  91. (SET #bad-kick "You must have at least Workbench 2.0+")
  92. (SET #bad-installer
  93. (CAT "You have an old version of the program 'Installer' "
  94.      "on your Amiga!\n\nThe installation procedure needs at least Installer 42.9.\n\n"
  95.      "Please check your configuration!\n\n"
  96.      "If you proceed the whole archive will be installed.\n"
  97.      "%s will work without any restrictions!"
  98. ))
  99.  
  100. (SET #App-InstallMsg
  101. (CAT "\n\%s installation script.\n"
  102.         "This script installs %s on your Amiga.\n\n"
  103.         "Read the DOK-file for more information\n"
  104.         " on the distribution of %s.\n\n"
  105.         "%s © 1995-96 Guido Mersmann\n"
  106.         "All rights reserved."
  107. ))
  108.  
  109. (SET #App-Where
  110. (CAT "Where would you like to install %s ?\n"
  111.         "(A drawer will be created)"
  112. ))
  113.  
  114. (SET #App-Update
  115. (CAT "\nA %s drawer does already exist in the selected "
  116.         " directory. By selecting \"Proceed\", you"
  117.         " indicate that you want to update the %s"
  118.         " installation with the most recent version.\n"
  119.         "Several %s specific files will be overwritten!"
  120. ))
  121.  
  122. (SET #App-Main "Which %s version should be installed ?")
  123. (SET #App-Main-help
  124. (CAT "The OS2.0+ version should only be used on Systems with OS2."
  125.      " The OS2.1+ and the OS3.0+ version need less Memory. Locale is required!"
  126.      " Special OS3.0+ functions are used to save more memory."
  127. ))
  128.  
  129. (SET #App-Language "Which languages should be installed ?")
  130. (SET #App-Language-help
  131. (CAT "\nThe Amiga can be operated in many different"
  132.           " languages."
  133.           "To reduce the amount of space consumed by the"
  134.           " language files, you can select to have only the"
  135.           " files of specific languages copied.\n\n"
  136.           "Simply check the boxes of the languages you wish"
  137.           " to have available on your system.\n\n"
  138.           @askoptions-help
  139. ))
  140.  
  141. (SET #App-Docs "Which Amiga-guide files should be installed ?")
  142.  
  143. (SET #startup-prompt    "Some lines need to be added to S:User-Startup for %s\n\n%s")
  144.  
  145. (SET #App-Exit "\n%s installed !!")
  146.  
  147.  
  148. ))
  149. ;----------------------------------------------------------------------------
  150. ;----------------------------------------------------------------------------
  151. ;    P_Requirements
  152. ;----------------------------------------------------------------------------
  153. ;----------------------------------------------------------------------------
  154. (PROCEDURE P_Requirements
  155. ; Workbench 37 or better required
  156. (IF (< (/ (getversion) 65536) 37)
  157. (
  158.   (abort #bad-kick)
  159. )
  160. )
  161. ; Installer 42.9 or better required
  162. (if (< @installer-version 2752521)
  163.   (
  164. (user 2)
  165.     (message (#bad-installer #ApplicationName))
  166.     (welcome)
  167.  
  168. ;---- Simple Copy all ask
  169. (SET #ApplicationDir
  170.         (TACKON
  171.                 (ASKDIR
  172.                         (PROMPT (#App-Where #ApplicationName))
  173.                         (HELP @askdir-help)
  174.                         (default #ApplicationDir)
  175.                 )
  176.                 #ApplicationName
  177.         )
  178. )
  179. (MAKEDIR #ApplicationDir (INFOS))
  180. (MAKEDIR (TACKON #ApplicationDir "Prefs"))
  181.                    (COPYFILES
  182.     (SOURCE "/")
  183.     (DEST #ApplicationDir)
  184.     (HELP @copyfiles-help)
  185.     (OPTIONAL <force>)
  186.     (ALL)
  187.     (INFOS)
  188.                    )
  189. (STARTUP #ApplicationName
  190.      (SET #dummy (cat "Path add Path " #ApplicationDir))
  191.       (HELP @startup-help)
  192.       (PROMPT (#startup-prompt #ApplicationName #dummy))
  193.       (COMMAND #dummy)
  194. )
  195.     (exit (quiet))
  196.   )
  197. )
  198. ) ;PROCEDURE
  199. ;----------------------------------------------------------------------------
  200. ;----------------------------------------------------------------------------
  201. ;    Ask for Catalogs
  202. ;----------------------------------------------------------------------------
  203. ;----------------------------------------------------------------------------
  204. (PROCEDURE P_AskCatalogs #Language
  205.  
  206. (SET #Dummy     (ASKOPTIONS
  207.                 (PROMPT #App-Language)
  208.                 (HELP #App-Language-help)
  209.                 (CHOICES
  210.                         "English"
  211.                         "Deutsch")
  212.                 (DEFAULT #Language)
  213.         )
  214. )
  215. ) ;PROCEDURE
  216. ;----------------------------------------------------------------------------
  217. ;----------------------------------------------------------------------------
  218. ;    Copy Selected Catalogs
  219. ;----------------------------------------------------------------------------
  220. ;----------------------------------------------------------------------------
  221. (PROCEDURE P_CopyCatalogs #Language
  222. (SET n 0)
  223. (SET #DestinationRoot (TACKON #ApplicationDir "Catalogs"))
  224. (SET #SourceRoot (TACKON #ArchiveDir "Catalogs"))
  225. (MAKEDIR #DestinationRoot)
  226.  
  227. (while (< n 2)
  228.         (SET #Dummy (SELECT n "english" "deutsch"))
  229.         (
  230.                 (IF (IN #Language n)
  231.                 (
  232.     (MAKEDIR (TACKON #DestinationRoot #Dummy))
  233.                         (COPYFILES
  234.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  235.                                 (DEST (TACKON #DestinationRoot #Dummy))
  236.                                 (HELP @copyfiles-help)
  237.                                 (ALL)
  238.                         )
  239.                 )
  240.                 )
  241.         )
  242. (SET n (+ n 1))
  243. )
  244. ) ;PROCEDURE
  245. ;----------------------------------------------------------------------------
  246. ;----------------------------------------------------------------------------
  247. ;    Ask for docs
  248. ;----------------------------------------------------------------------------
  249. ;----------------------------------------------------------------------------
  250. (PROCEDURE P_AskDocs #Documents
  251. (SET #Dummy             (ASKOPTIONS
  252.                         (PROMPT #App-Docs)
  253.                         (HELP @askoptions-help)
  254.                         (CHOICES
  255.                         ;"english"
  256.                         "deutsch"
  257.                         )
  258.                         (DEFAULT #Documents)
  259.                   )
  260. )
  261. ) ;PROCEDURE
  262. ;----------------------------------------------------------------------------
  263. ;----------------------------------------------------------------------------
  264. ;    Copy docs
  265. ;----------------------------------------------------------------------------
  266. ;----------------------------------------------------------------------------
  267. (PROCEDURE P_CopyDocs #Documents
  268. (SET n 0)
  269. (SET #DestinationRoot (TACKON #ApplicationDir "Docs"))
  270. (SET #SourceRoot (TACKON #ArchiveDir "Docs"))
  271. (MAKEDIR #DestinationRoot)
  272.  
  273. (while (< n 1)
  274.         (SET #Dummy (SELECT n
  275.         ;"english"
  276.         "deutsch"
  277.     )
  278.         )
  279.         (
  280.                 (IF (IN #Documents n)
  281.                 (
  282.     (MAKEDIR (TACKON #DestinationRoot #Dummy))
  283.                         (COPYFILES
  284.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  285.                                 (DEST (TACKON #DestinationRoot #Dummy))
  286.                                 (HELP @copyfiles-help)
  287.                                 (INFOS)
  288.                                 (ALL)
  289.                         )
  290.                 )
  291.                 )
  292.         )
  293. (SET n (+ n 1))
  294. )
  295. ) ;PROCEDURE
  296. ;----------------------------------------------------------------------------
  297. ;----------------------------------------------------------------------------
  298. ;    Copy_Dir (Dir)
  299. ;----------------------------------------------------------------------------
  300. ;----------------------------------------------------------------------------
  301. (PROCEDURE P_CopyDir #Dummy
  302.  
  303. (SET #DestinationRoot (TACKON #ApplicationDir #Dummy))
  304. (SET #SourceRoot (TACKON #ArchiveDir #Dummy))
  305. (MAKEDIR #DestinationRoot)
  306.  
  307.                    (COPYFILES
  308.     (SOURCE #SourceRoot)
  309.     (DEST #DestinationRoot)
  310.     (HELP @copyfiles-help)
  311.     (OPTIONAL <force>)
  312.     (ALL)
  313.     (INFOS)
  314.                    )
  315. ) ;PROCEDURE
  316. ;----------------------------------------------------------------------------
  317. ;----------------------------------------------------------------------------
  318. ;    Copy_File (Name)
  319. ;----------------------------------------------------------------------------
  320. ;----------------------------------------------------------------------------
  321. (PROCEDURE P_CopyFile #Dummy
  322.  
  323. (if (<> (exists (TACKON #ArchiveDir #Dummy) (noreq)) 0) 
  324. (
  325.                    (COPYFILES
  326.     (SOURCE (TACKON #ArchiveDir #Dummy))
  327.     (DEST #ApplicationDir)
  328.     (HELP @copyfiles-help)
  329.     (OPTIONAL <force>)
  330.     (ALL)
  331.     (INFOS)
  332.                    )
  333. )
  334. ) ;If
  335. ) ;PROCEDURE
  336. ;----------------------------------------------------------------------------
  337. ;----------------------------------------------------------------------------
  338. ;    GetApplicationDir
  339. ;----------------------------------------------------------------------------
  340. ;----------------------------------------------------------------------------
  341. (PROCEDURE P_GetApplicationDir #Dummy
  342.  
  343. (SET #ApplicationDir
  344.         (TACKON
  345.                 (ASKDIR
  346.                         (PROMPT (#App-Where #ApplicationName))
  347.                         (HELP @askdir-help)
  348.                         (default #Dummy)
  349.                 )
  350.                 #ApplicationName
  351.         )
  352. )
  353. ) ;PROCEDURE
  354. ;----------------------------------------------------------------------------
  355. ;----------------------------------------------------------------------------
  356. ;    P_Update
  357. ;----------------------------------------------------------------------------
  358. ;----------------------------------------------------------------------------
  359. (PROCEDURE P_Update
  360. (if (= (exists #ApplicationDir) 2)
  361.         (message (#App-Update #ApplicationName #ApplicationName #ApplicationName))
  362. )
  363. ) ;PROCEDURE
  364. ;----------------------------------------------------------------------------
  365. ;----------------------------------------------------------------------------
  366. ;    P_AskBinary
  367. ;----------------------------------------------------------------------------
  368. ;----------------------------------------------------------------------------
  369. (PROCEDURE P_AskBinary
  370. (set #Dummy (/ (getversion) 65536))
  371.  
  372. (if (= #Dummy 37) (set #Binary 0))
  373. (if (= #Dummy 38) (set #Binary 1))
  374. (if (> #Dummy 38) (set #Binary 2))
  375.  
  376. (set #Binary (askchoice
  377.     (prompt (#App-Main #ApplicationName))
  378.     (help (#App-Main-help #ApplicationName))
  379.     (choices
  380.     "OS2.0+"
  381.                            "OS2.1+"
  382.                            "OS3.0+"
  383.                         )
  384.     (default #Binary)
  385.             )
  386. )
  387. ) ;PROCEDURE
  388. ;----------------------------------------------------------------------------
  389. ;----------------------------------------------------------------------------
  390. ;    P_CopyBinary
  391. ;----------------------------------------------------------------------------
  392. ;----------------------------------------------------------------------------
  393. (PROCEDURE P_CopyBinary #Dummy
  394.  
  395. (set #BinaryName (SELECT #Binary #Dummy (CAT "Bin/" #Dummy "_OS21") (CAT "Bin/" #Dummy "_OS30")))
  396. (copyfiles
  397.         (source (tackon #ArchiveDir #BinaryName) (infos))
  398.         (dest #ApplicationDir)
  399.         (newname #Dummy)
  400.         (help @copyfiles-help)
  401.         (optional <force>)
  402. )
  403. ) ;PROCEDURE
  404. ;----------------------------------------------------------------------------
  405. ;----------------------------------------------------------------------------
  406. ;    P_KeyFile
  407. ;----------------------------------------------------------------------------
  408. ;----------------------------------------------------------------------------
  409. (PROCEDURE P_KeyFile
  410.  
  411. (SET #Dummy (tackon (tackon #ArchiveDir "Keyfile") #ApplicationKeyfile))
  412.  
  413. (if (<> (exists #Dummy (noreq)) 0) ((P_CopyDir "KeyFile"))
  414. )
  415. ) ;PROCEDURE
  416. ;----------------------------------------------------------------------------
  417. ;----------------------------------------------------------------------------
  418. ;    P_CopyArchiveIcon
  419. ;----------------------------------------------------------------------------
  420. ;----------------------------------------------------------------------------
  421. (PROCEDURE P_CopyArchiveIcon
  422.                    (COPYFILES
  423.     (SOURCE (CAT (CAT (TACKON #ArchiveDir "/") #ApplicationName) ".info"))
  424.     (DEST (TACKON #ApplicationDir "/"))
  425.     (HELP @copyfiles-help)
  426.                    )
  427. ) ;PROCEDURE
  428. ;----------------------------------------------------------------------------
  429. ;----------------------------------------------------------------------------
  430. ;    MAIN
  431. ;----------------------------------------------------------------------------
  432. ;----------------------------------------------------------------------------
  433. (P_Requirements)
  434. (message (#App-installmsg #ApplicationName #ApplicationName #ApplicationName #ApplicationName))
  435. (welcome)
  436.  
  437.  (SET #ApplicationDir (P_GetApplicationDir #ApplicationDir))
  438.  
  439. (COMPLETE 1)
  440.  (P_Update)
  441.  (SET #Binary (P_AskBinary))
  442. (COMPLETE 2)
  443.  (SET #Language (P_AskCatalogs #Language))
  444. (COMPLETE 3)
  445.  (SET #Documents (P_AskDocs #Documents))
  446. (COMPLETE 4)
  447.  
  448. ;***** Delete old Data and Prefs
  449. (MAKEDIR #ApplicationDir)
  450. (MAKEDIR (TACKON #ApplicationDir "Prefs"))
  451.  
  452. (COMPLETE 10)
  453.  (P_CopyBinary #ApplicationName)
  454. (COMPLETE 20)
  455.  (P_CopyBinary "AViewPrefs")
  456. (COMPLETE 30)
  457.  (P_CopyCatalogs #Language)
  458. (COMPLETE 40)
  459.  (P_CopyDocs #Documents)
  460. (COMPLETE 60)
  461.  (P_Keyfile)
  462. (COMPLETE 70)
  463.  (P_CopyArchiveIcon)
  464.  (P_CopyFile "AViewPrefs.info")
  465.  (P_CopyFile "Docs.info")
  466.  (P_CopyFile "Install.info")
  467. (COMPLETE 80)
  468. (STARTUP #ApplicationName
  469.      (SET #dummy (cat "Path add Path " #ApplicationDir))
  470.       (HELP @startup-help)
  471.       (PROMPT (#startup-prompt #ApplicationName #dummy))
  472.       (COMMAND #dummy)
  473. )
  474.  
  475. (COMPLETE 100)
  476.  
  477. ;(exit #App-exit)
  478.